package com.lagou.edu.utils;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * @author leonzhangxf
 */
public class JdbcProperties {

    public static final String JDBC_PROPERTIES_NAME = "jdbc.properties";

    public static Properties loadJdbcProperties(String jdbcPropertiesName) {
        InputStream inputStream = Thread.currentThread().getContextClassLoader()
            .getResourceAsStream(jdbcPropertiesName);
        Properties properties = new Properties();
        try {
            properties.load(inputStream);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return properties;
    }
}
